<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../../common/jsp/taglibs.jsp"%>
<!-- 
    Copyright (C)  2011  chen wei hua.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 2.0
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled "GNU Free Documentation License".
 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>原料需求一览</title>
<%@ include file="../../common/jsp/config.jsp"%>
<script type="text/javascript">

     function querySubmit() {
    	 $("#materialsRequestList").submit();
    	 return false;
     }

</script>
</head>

<body>
    <div class="subnav" align="left">
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="100%" align="left" height="31">&nbsp;<img src="common/images/title-pk.gif" border="0"  align="absmiddle"/>&nbsp;<span class="subnavtxt1">出货管理</span>
			&nbsp;<img src="common/images/leftico2.gif" border="0"  align="absmiddle"/>&nbsp;<span class="subnavtxt2">原料需求一览</span></td>
		  </tr>
		</table>
      </div>
   <div class="divborder">
      <s:form action="materialsRequestList">
        <table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr>
            <td width="10%" align="right">订单号</td>
            <td width="16%"><s:textfield name="condition.orderId" size="20" /></td>
            <td width="11%" align="right">原料编号</td>
            <td width="25%"><s:textfield name="condition.code" size="20" /></td>
            <td align="right"><input name="button" type="button" class="input1" value="查 询" onclick="querySubmit()"/></td>
          </tr>
        </table>
      </s:form>
  </div >     
    <s:form action="newSupplierOrderFromDetail">
      <div class="ksglxx2">
        <table width="100%" cellpadding="0" cellspacing="1" border="0" class="ksglxx2a">
          <tr class="ksglxx2bg">
          	 <th width="20px" ></th>
             <th width="10%" >原料编号</th>
             <th width="8%" >原料分类</th>
             <th width="10%" >原料名称</th>
             <th width="20%" >属性描述</th>
             <th width="8%" >需求数量</th>
             <th width="8%" >单位</th>
             <th width="10%" >要求到货日期</th>
             <th >订单号</th>
          </tr>
		<s:iterator value="requestList" id="request" status="st">
          <s:if test="#st.Odd">
            <tr class="odd">
              <td>
                <s:checkbox name="requestIds" fieldValue="%{#request.id}" />
              </td>
              <td><s:property value="#request.code" /></td>
              <td><s:property value="#request.category" /></td>
              <td><s:property value="#request.name" /></td>
              <td><s:property value="#request.property" /></td>
              <td><s:property value="#request.planNumber" /></td>
              <td><s:property value="#request.units" /></td>
              <td><s:date name="#request.finishDate" format="yyyy-MM-dd"/></td>
              <td><s:property value="#request.orderId" /></td>
            </tr>
          </s:if>
          <s:else>
            <tr class="even">
              <td>
                <s:checkbox name="requestIds" fieldValue="%{#request.id}" />
              </td>
              <td><s:property value="#request.code" /></td>
              <td><s:property value="#request.category" /></td>
              <td><s:property value="#request.name" /></td>
              <td><s:property value="#request.property" /></td>
              <td><s:property value="#request.planNumber" /></td>
              <td><s:property value="#request.units" /></td>
              <td><s:date name="#request.finishDate" format="yyyy-MM-dd"/></td>
              <td><s:property value="#request.orderId" /></td>
            </tr>
           </s:else>
		</s:iterator>
      </table>
     </div>
     <div class="clear"></div>
	 <div class="main_1">
		<table width="98%" border="0" cellpadding="5" cellspacing="0" class="gr-text1">
		   <tr>
			 <td width="45%" align="right">
			   <s:submit value="生成采购单" cssClass="input1" /></td>
			 <td width="55%" align="left"></td>
		   </tr>
	   </table>
	</div>
    </s:form>
</body>
</html>
